/* 全局：隐藏滚动条 */
*::-webkit-scrollbar {
    display: none;
}

/* 列表容器 */
ul {
    padding-left: 0;
    margin: 0;
}

/* 单个题目 */
.ques-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 10px 0;
    padding: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.ques-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 序号 */
.ques-id {
    font-weight: bold;
    margin-left: 4px;
    flex-shrink: 0;
}

/* 题干+选项 */
.item-wrapper {
    flex: 1;
}

.ques-content {
    display: flex;
    flex-direction: column;
}

.content-img {
    max-height: 130px;
    margin-top: 8px;
}

/* 题干文本 */
.ques-text {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4em;
}

/* 折叠时隐藏选项、最多两行题干 */
.collapsed .ques-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.collapsed .content-img {
    display: none;
}

.collapsed .option-list {
    display: none;
}

/* 展开时 */
.expanded .ques-text {
    display: block;
}

/* 选项样式 */
.option-list {
    list-style: none;
    margin-top: 8px;
    padding-left: 1em;
}

.option-list li {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.option-img {
    max-height: 60px;
    margin-left: 10px;
    border-radius: 4px;
}

.correct-option {
    background-color: #d4edda;
    padding-left: 8px;
}

#selectedList li {
    position: relative; /* 为 delete-btn 提供定位参照 */
}

/* 删除键 */
.delete-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background-color: #ffffff;
    color: #888;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.delete-btn:hover {
    background-color: #e74c3c;
    color: white;
}

/* === PDF 导出时 === */
body.pdf-exporting .collapsed {
    max-height: none !important;
    overflow: visible !important;
}

body.pdf-exporting .collapsed .ques-text {
    display: block !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

body.pdf-exporting .collapsed .option-list {
    display: block !important;
}

body.pdf-exporting .collapsed .content-img {
    display: block !important;
}

/*body.pdf-exporting .collapsed .option-img {*/
/*    display: block !important;*/
/*}*/

body.pdf-exporting li {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.pdf-exporting.correct-option {
    background-color: white !important;
}
